Optimal. Leaf size=26 \[ -\frac{a \cot (e+f x)}{f}-\frac{b \tanh ^{-1}(\cos (e+f x))}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0370161, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {2748, 3767, 8, 3770} \[ -\frac{a \cot (e+f x)}{f}-\frac{b \tanh ^{-1}(\cos (e+f x))}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2748
Rule 3767
Rule 8
Rule 3770
Rubi steps
\begin{align*} \int \csc ^2(e+f x) (a+b \sin (e+f x)) \, dx &=a \int \csc ^2(e+f x) \, dx+b \int \csc (e+f x) \, dx\\ &=-\frac{b \tanh ^{-1}(\cos (e+f x))}{f}-\frac{a \operatorname{Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}\\ &=-\frac{b \tanh ^{-1}(\cos (e+f x))}{f}-\frac{a \cot (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.0244442, size = 52, normalized size = 2. \[ -\frac{a \cot (e+f x)}{f}+\frac{b \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}-\frac{b \log \left (\cos \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.029, size = 35, normalized size = 1.4 \begin{align*}{\frac{b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}}-{\frac{\cot \left ( fx+e \right ) a}{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.76716, size = 54, normalized size = 2.08 \begin{align*} -\frac{b{\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + \frac{2 \, a}{\tan \left (f x + e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.59715, size = 180, normalized size = 6.92 \begin{align*} -\frac{b \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - b \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a \cos \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (e + f x \right )}\right ) \csc ^{2}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 2.18197, size = 84, normalized size = 3.23 \begin{align*} \frac{2 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) + a \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \frac{2 \, b \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + a}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]